#ifndef HISTORIQUEREQUETES_H
#define HISTORIQUEREQUETES_H

#include "include.h"
#include "requete.h"

class HistoriqueRequetes : public QWidget
{
    Q_OBJECT

private:
    void setupUi();

    QAction* actRefresh;
    QAction* actRename;
    QAction* actSave;
    QAction* actDelete;
    QAction* actFavoris;

    QPushButton* btnSave;
    QTreeWidget* tree;
    QVBoxLayout* vbPrincipale;
    QList<Requete> listeRequete;
    void chargerRequetes();
    void enregistrerRequetes();

public:
    explicit HistoriqueRequetes(QWidget *parent = 0);
    ~HistoriqueRequetes();

signals:
    void sendRequete(QString);

public slots:
    void nommer();
    void afficherArbre();
    void mettreEnFavoris();
    void enregistrer();
    void supprimer();
    void requeteListener(QString q);
    void afficheRequete(QTreeWidgetItem* current, QTreeWidgetItem*);
    
};

#endif // HISTORIQUEREQUETES_H
